home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / cc / dist / c-tree.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-07-15  |  4.7 KB  |  152 lines

  1. /* Definitions for C parsing and type checking.
  2.    Copyright (C) 1987 Free Software Foundation, Inc.
  3.  
  4. This file is part of GNU CC.
  5.  
  6. GNU CC is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 1, or (at your option)
  9. any later version.
  10.  
  11. GNU CC is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GNU CC; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. /* Language-dependent contents of an identifier.  */
  21.  
  22. struct lang_identifier
  23. {
  24.   struct tree_identifier ignore;
  25.   tree global_value, local_value, label_value, implicit_decl;
  26.   tree error_locus;
  27. };
  28.  
  29. /* Macros for access to language-specific slots in an identifier.  */
  30.  
  31. #define IDENTIFIER_GLOBAL_VALUE(NODE)    \
  32.   (((struct lang_identifier *)(NODE))->global_value)
  33. #define IDENTIFIER_LOCAL_VALUE(NODE)    \
  34.   (((struct lang_identifier *)(NODE))->local_value)
  35. #define IDENTIFIER_LABEL_VALUE(NODE)    \
  36.   (((struct lang_identifier *)(NODE))->label_value)
  37. #define IDENTIFIER_IMPLICIT_DECL(NODE)    \
  38.   (((struct lang_identifier *)(NODE))->implicit_decl)
  39. #define IDENTIFIER_ERROR_LOCUS(NODE)    \
  40.   (((struct lang_identifier *)(NODE))->error_locus)
  41.  
  42. /* Nonzero means reject anything that ANSI standard C forbids.  */
  43. extern int pedantic;
  44.  
  45. /* In a RECORD_TYPE or UNION_TYPE, nonzero if any component is read-only.  */
  46. #define C_TYPE_FIELDS_READONLY(type) TYPE_SEP_UNIT (type)
  47.  
  48. /* in c-typecheck.c */
  49. extern tree build_component_ref(), build_conditional_expr(), build_compound_expr();
  50. extern tree build_unary_op(), build_binary_op(), build_function_call();
  51. extern tree build_binary_op_nodefault ();
  52. extern tree build_indirect_ref(), build_array_ref(), build_c_cast();
  53. extern tree build_modify_expr();
  54. extern tree c_sizeof (), c_alignof ();
  55. extern void store_init_value ();
  56. extern tree digest_init ();
  57. extern tree c_expand_start_case ();
  58. extern tree default_conversion ();
  59.  
  60. /* Given two integer or real types, return the type for their sum.
  61.    Given two compatible ANSI C types, returns the merged type.  */
  62.  
  63. extern tree commontype ();
  64.  
  65. /* in c-decl.c */
  66. extern tree build_label ();
  67.  
  68. extern int start_function ();
  69. extern void finish_function ();
  70. extern void store_parm_decls ();
  71. extern tree get_parm_info ();
  72.  
  73. extern void pushlevel ();
  74. extern tree poplevel ();
  75.  
  76. extern tree groktypename(), lookup_name();
  77.  
  78. extern tree lookup_label(), define_label();
  79.  
  80. extern tree implicitly_declare(), getdecls(), gettags ();
  81.  
  82. extern tree start_decl();
  83. extern void finish_decl();
  84.  
  85. extern tree start_struct(), finish_struct(), xref_tag();
  86. extern tree grokfield();
  87.  
  88. extern tree start_enum(), finish_enum();
  89. extern tree build_enumerator();
  90.  
  91. extern tree make_index_type ();
  92.  
  93. extern tree double_type_node, long_double_type_node, float_type_node;
  94. extern tree char_type_node, unsigned_char_type_node, signed_char_type_node;
  95.  
  96. extern tree short_integer_type_node, short_unsigned_type_node;
  97. extern tree long_integer_type_node, long_unsigned_type_node;
  98. extern tree long_long_integer_type_node, long_long_unsigned_type_node;
  99. extern tree unsigned_type_node;
  100. extern tree string_type_node, char_array_type_node, int_array_type_node;
  101.  
  102. extern int current_function_returns_value;
  103. extern int current_function_returns_null;
  104.  
  105. extern tree ridpointers[];
  106.  
  107. /* Nonzero means `$' can be in an identifier.  */
  108.  
  109. extern int dollars_in_ident;
  110.  
  111. /* Nonzero means allow type mismatches in conditional expressions;
  112.    just make their values `void'.   */
  113.  
  114. extern int flag_cond_mismatch;
  115.  
  116. /* Nonzero means don't recognize the keyword `asm'.  */
  117.  
  118. extern int flag_no_asm;
  119.  
  120. /* Nonzero means warn about implicit declarations.  */
  121.  
  122. extern int warn_implicit;
  123.  
  124. /* Nonzero means warn about function definitions that default the return type
  125.    or that use a null return and have a return-type other than void.  */
  126.  
  127. extern int warn_return_type;
  128.  
  129. /* Nonzero means give string constants the type `const char *'
  130.    to get extra warnings from them.  These warnings will be too numerous
  131.    to be useful, except in thoroughly ANSIfied programs.  */
  132.  
  133. extern int warn_write_strings;
  134.  
  135. /* Nonzero means warn about sizeof(function) or addition/subtraction
  136.    of function pointers.  */
  137.  
  138. extern int warn_pointer_arith;
  139.  
  140. /* Nonzero means warn for all old-style non-prototype function decls.  */
  141.  
  142. extern int warn_strict_prototypes;
  143.  
  144. /* Nonzero means warn about pointer casts that can drop a type qualifier
  145.    from the pointer target type.  */
  146.  
  147. extern int warn_cast_qual;
  148.  
  149. /* Nonzero means do some things the same way PCC does.  */
  150.  
  151. extern int flag_traditional;
  152.